home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
4_0
/
BISON-TC
/
THINK_C_.NOT
< prev
next >
Wrap
Text File
|
1990-02-19
|
2KB
|
49 lines
Notes on the THINK C version of Bison
Russell S. Finn, 19-FEB-90
Internet: rsfinn@athena.mit.edu, rsfinn@neutron.lcs.mit.edu
CompuServe: 76377,1107
GEnie: RSFINN
Apparently, Richard Stallman and the Free Software Foundation discourage
the porting of FSF software to Apple computers, after the Microsoft/HP
lawsuit. However, I've owned a Macintosh for four years, and I needed
to do this project at home, so I chose to port Bison to the Macintosh.
I believe an MPW implementation already exists, but I don't own MPW,
so this version (created with THINK C 4.0) is the result. While I will
not be sending this version to the FSF (since I don't think they really
want it), I am following the terms of their General Public License
(which may be found in the file "COPYING"); hence this package includes
both the executable application and the entire source code distribution,
as I received it.
The current version (modification date January 23, 1990) has only the
bare-bones interface provided by the THINK C library routine "ccommand",
which allows the user to type a command line and to redirect the output.
Perhaps someday I may try to implement a "real" user interface; perhaps
not.
The only modifications made to the source file are surrounded by "#ifdef
THINK_C"..."#endif"; in theory, then, these sources could be recompiled
on another system if necessary. These are the actual files modified:
alloca.c, allocate.c, conflicts.c, files.c, getopt.c, machine.h,
main.c, reader.c, system.h. Most of these changes were minor, and many
of them would have been unnecessary if the original Bison source code
had been written for an ANSI-compliant C compiler.
THINK C users may find it convenient to have the output text files written
by Bison be THINK C documents. To do this, create a copy of the "ANSI"
project called "ANSI-KAHL", and a copy of the file "fopen.c" called
"fopen-KAHL.c". In the copy, find the routine "setfiletype", and replace
the lines:
if (!(oflag & F_BINARY))
pb.ioFlFndrInfo.fdType = 'TEXT';
with the lines:
if (!(oflag & F_BINARY)) {
pb.ioFlFndrInfo.fdType = 'TEXT';
pb.ioFlFndrInfo.fdCreator = 'KAHL';
}
Replace "fopen.c" with the new "fopen-KAHL.c", rebuild the new project
"ANSI-KAHL", and use this project in the project file "Bison.╣"
instead of the "ANSI" project.